package common

import (
	"beesoft.ink/application/garage/app/helper"
	"beesoft.ink/application/garage/app/service/common"
	"fmt"
	"github.com/labstack/echo/v4"
)

var Garage garage

type garage struct{}

func (r garage) Categories(ctx echo.Context) error {
	categoryType, err := helper.ParseUintQueryParam(ctx, "type")
	if err != nil {
		fmt.Println(err)
	}
	res := common.Garage.Categories(ctx, categoryType)
	return helper.NewResponse(ctx).ResponseOk(res)
}
func (r garage) Garages(ctx echo.Context) error {
	res := common.Garage.Garages(ctx)
	return helper.NewResponse(ctx).ResponseOk(res)
}
